﻿using System.ComponentModel.DataAnnotations;
using WebAPI.Util;

namespace InParkRedemptionAPI.Models
{
    public class GetRedemptionPointListRequest : BasePageInput
    {
        [MaxLength(200, ErrorMessage = "Code Max Length Error")]
        public string? Code { get; set; }
        [MaxLength(200, ErrorMessage = "Name Max Length Error")]
        public string? Name { get; set; }
        [MaxLength(250, ErrorMessage = "Description Max Length Error")]
        public string? Description { get; set; }  
        public string? OperationArea { get; set; }
        public string? Enable { get; set; } = null;
    }

    public class GetRedemptionPointProductListResponse
    {
        public Guid ProductId { get; set; }
        public string? ProductCode { get; set; }
        public string? ProductName { get; set; }
        public string? Function { get; set; }

        public bool IsCheck { get; set; }
    }

    public class GetRedemptionPointProductRequest
    {
        public Guid RedemptionPointId { get; set; }
        public string? FieldName { get; set; }
    }

    public class GetRedemptionPointListResponse
    {
        public Guid Id { get; set; }
        public string Code { get; set; }
        public string? Name { get; set; }
        public string Description { get; set; }
        public Guid OperationAreaId { get; set; }
        public List<Guid> ProductIds { get; set; }
        public string OperationArea { get; set; }
        public bool HasProduct { get; set; }
        public bool Enable { get; set; }
        public string CreateUser { get; set; }
        public string CreateDate { get; set; }
        public string UpdateUser { get; set; }
        public string UpdateDate { get; set; }
    }

    public class UpdateRedemptionPointRequest
    {
        [Required(ErrorMessage = "ID is required")]
        public Guid ID { get; set; }

        [Required(ErrorMessage = "OperationAreaID is required")]
        public Guid OperationAreaID { get; set; }

        [MaxLength(200, ErrorMessage = "Code Max Length Error")]
        public string? Code { get; set; }

        [MaxLength(255, ErrorMessage = "Name Max Length Error")]
        public string? Name { get; set; }
        public string? Description { get; set; }
        public List<Guid> ProductIds { get; set; }
        public bool Enable { get; set; }
    }

    public class AddRedemptionPointRequest
    {
        [Required(ErrorMessage = "OperationAreaID is required")]
        public Guid OperationAreaID { get; set; }

        [MaxLength(200, ErrorMessage = "Code Max Length Error")]
        public string? Code { get; set; }

        [MaxLength(255, ErrorMessage = "Name Max Length Error")]
        public string? Name { get; set; }

        public string? Description { get; set; }
        public List<Guid> ProductIds { get; set; }
        public bool Enable { get; set; }
    }

    public class DeleteRedemptionPointRequest
    {
        [Required(ErrorMessage = "ID is required")]
        public List<Guid> IDs { get; set; }
        [Required(ErrorMessage = "Enable is required")]
        public bool Enable { get; set; }
    }

    public class EnableRedemptionPointRequest
    {
        [Required(ErrorMessage = "IDs is required")]
        public string Ids { get; set; }

        public bool Enable { get; set; }

    }
}
